#pragma once

#include "szp_hardware_driver.h"
#include "tinyusb_driver.h"
#include "wifi_driver.h"
#include "button_driver.h"
#include "lvgl.h"
#include "esp_lvgl_port.h"
#include "esp_camera.h"
#include "screens.h"

#ifdef __cplusplus
extern "C"
{
#endif

#define CAMERA_PIN_PWDN -1
#define CAMERA_PIN_RESET -1
#define CAMERA_PIN_XCLK 5
#define CAMERA_PIN_SIOD 1
#define CAMERA_PIN_SIOC 2

#define CAMERA_PIN_D7 9
#define CAMERA_PIN_D6 4
#define CAMERA_PIN_D5 6
#define CAMERA_PIN_D4 15
#define CAMERA_PIN_D3 17
#define CAMERA_PIN_D2 8
#define CAMERA_PIN_D1 18
#define CAMERA_PIN_D0 16
#define CAMERA_PIN_VSYNC 3
#define CAMERA_PIN_HREF 46
#define CAMERA_PIN_PCLK 7

#define XCLK_FREQ_HZ 24000000

    void task_camera_show(void *arg);
    void task_camera_get(void *arg);
    void task_take_photo(void *arg);
    void camera_init(int jpeg_quality_set, framesize_t frame_size_set);

#ifdef __cplusplus
}
#endif
